PROJECT(ItkDolfin)
INCLUDE(CPack)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.2 FATAL_ERROR)

# TODO, for now we assume that FEniCS is installed
#SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
#FIND_PACKAGE( FEniCS )
#INCLUDE_DIRECTORIES( ${FENICS_DIR} )

# TODO this should be moved to findfenics
FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(DOLFIN REQUIRED dolfin)
#LINK_DIRECTORIES(${DOLFIN_LIBRARY_DIRS})
#INCLUDE_DIRECTORIES(${DOLFIN_INCLUDE_DIRS})
#SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${DOLFIN_CFLAGS})
SET(LINK_FLAGS ${LINK_FLAGS} ${DOLFIN_LDFLAGS})
SET(LINK_FLAGS_RELEASE ${LINK_FLAGS_RELEASE} ${DOLFIN_LDFLAGS})

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/src)

# wrapping
ADD_SUBDIRECTORY(wrapping)
